home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
T_BCINFO.ARJ
/
TI800.ASC
< prev
next >
Wrap
Text File
|
1992-02-25
|
815b
|
67 lines
PRODUCT : C++ NUMBER : 800
VERSION : All
OS : PC DOS
DATE : February 25, 1992 PAGE : 1/1
TITLE : Don't Overlook argv[0]!
The declaration
int main (int argc, char *argv[]) {
is a familiar sight. What you may not know is that argv[0] is a
small treasure. It is the name of the program that is running.
It also contains the path of the program. For instance, if it is
necessary to know the path from which an exceuting program was
invoked, use the fnsplit() function to extract the path from
argv[0]. You can also find out if the program has been renamed
after it was compiled.